<?php
$this->headLink()
        ->appendStylesheet($this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN . '/css/main.css')
        ->appendStylesheet($this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN . '/css/article.css')
        ->appendStylesheet('http://fonts.googleapis.com/css?family=Oswald:300');

?>
<?php $this->placeholder('slide')->captureStart() ?>
<div class="s-item">
    <div class="s-i-caption">
        <h3>Our Portfolio</h3>
        <p>Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text</p>
    </div>
    <div class="s-i-image">
        <img alt="" src="<?php echo $this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN ?>/images/portfolio-banner.png"/>
    </div>
</div>
<?php $this->placeholder('slide')->captureEnd() ?>
<div id="main-outter">
    <?php echo $this->rWidget('category', 'templatecategories', array('featured' => null, 'start_depth' => null, 'end_depth' => 0))?>
    <div id="main">
        <div id="m-left">
            <?php
            /*
             * Add older articles
             *
             */
            //echo $this->rWidget('news', 'older', array('article_id' => $this->article->id, 'category_id' => $this->article->category_id, 'limit' => 5));
            /**
             * Add FB Likebox 
             */
            echo $this->rWidget(
                        'core', 
                        'fblikebox',
                        array(
                            'page_url' => 'href=http://www.facebook.com/idgitcomvn',
                            'color_scheme' => 'light',
                            'show_faces' => 'true',
                            'app_id' => '321661271228186',
                            'width' => 250,
                            'height' => 590
                        )
                    );
            ?>
            
        </div>
        <div id="m-right" class="category">
            <?php 
            $count = count($this->articles);
            if($this->articles && $count > 0){
                foreach($this->articles as $article){
            ?>
            <div class="c-article">
                <div class="a-top">
                    <div class="a-created-date">
                        <span class="month-year"><?php echo date('M, Y', strtotime($article->created_date))?></span>
                        <span class="day"><?php echo date('d', strtotime($article->created_date))?></span>
                    </div>
                    <div class="a-title">
                        <h3><a href="<?php echo $this->url($article->getProperties(), 'news_article_details')?>"><?php echo $article->title?></a></h3>
                        <div class="a-data">
                            <p class="a-category"><span><?php echo $this->translate('news_article_category_category')?>:</span><?php echo $article->category_name?></p>
                            <p class="a-author"><span><?php echo $this->translate('news_article_category_written_by')?>:</span><?php echo ($article->author) ? $article->author : $article->created_user_name?></p>
                            <p class="a-views"><span><?php echo $article->num_views . ' '. $this->translate('news_article_category_written_views')?></span></p>
                        </div>
                    </div>
                </div>
                
                <div class="a-image">
                    <img alt="" width="665" height="310" src="<?php echo $article->image_large?>"/>
                </div>
                <div class="a-summary">
                    <?php echo Rabbit_Utility_String::truncateString($article->content, 200)?>
                </div>
                <a href="" class="a-readmore">Read more</a>
            </div>
            <?php
                }
            }?>
            <div id="pagination">
                <div id="paginator">
                    <?php echo $this->paginator()->slide($this->paginator, $this->paginatorOptions); ?>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>    
    </div>
    <div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<?php echo $this->rWidget('news', 'featured', array('limit' => 4, 'category_id' => 59)); ?>
